package whisper.service.constants;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created by JT on 2018/5/9
 */
@Component
public class UtilsInfo {

    @Value("${util.transcode.parent.path}")
    private String utilTranscodeParentPath;

    @Value("${util.transcode.ffmpeg.name}")
    private String utilTranscodeFfmpegName;

    @Value("${util.transcode.qtfaststart.name}")
    private String utilTranscodeQtFaststartName;


    public String getUtilTranscodeParentPath() {
        return utilTranscodeParentPath.endsWith("/") ? utilTranscodeParentPath : utilTranscodeParentPath + "/";
    }

    public void setUtilTranscodeParentPath(String utilTranscodeParentPath) {
        this.utilTranscodeParentPath = utilTranscodeParentPath;
    }

    public String getUtilTranscodeFfmpegName() {
        return utilTranscodeFfmpegName;
    }

    public void setUtilTranscodeFfmpegName(String utilTranscodeFfmpegName) {
        this.utilTranscodeFfmpegName = utilTranscodeFfmpegName;
    }

    public String getUtilTranscodeFfmpegPath() {
        return this.getUtilTranscodeParentPath() + this.utilTranscodeFfmpegName;
    }


    public String getUtilTranscodeQtFaststartName() {
        return utilTranscodeQtFaststartName;
    }

    public void setUtilTranscodeQtFaststartName(String utilTranscodeQtFaststartName) {
        this.utilTranscodeQtFaststartName = utilTranscodeQtFaststartName;
    }

    public String getUtilTranscodeQtFaststartPath() {
        return this.getUtilTranscodeParentPath() + this.utilTranscodeQtFaststartName;
    }
}
